package com.binbinyl.helper.network

import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response
import java.io.IOException

/**
 * 网络请求拦截
 *  -- 供业务模块在请求的前/后自定义行为
 */
interface RequestHandler {

    fun beforeRequest(request: Request, chain: Interceptor.Chain): Request

    @Throws(IOException::class)
    fun afterRequest(response: Response, chain: Interceptor.Chain): Response
}